<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <meta name="referrer" content="no-referrer-when-downgrade">
    

    <title> | 早起的年轻人</title>
    <meta property="og:title" content=" - 早起的年轻人">
    <meta property="og:type" content="article">
        
        
    <meta name="Keywords" content="Flutter，golang,go语言,go语言笔记,飞雪无情,java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="">
        
    <meta name="author" content="luckly">
    <meta property="og:url" content="https://luckly.work/post/flutter/Flutter%E4%BD%BF%E7%94%A8-FAB-%E7%9A%84%E5%BA%95%E9%83%A8%E5%BA%94%E7%94%A8%E6%A0%8F%E5%AF%BC%E8%88%AA/">
    <link rel="shortcut icon" href='/favicon.ico'  type="image/x-icon">

    <link rel="stylesheet" href='/css/normalize.css'>
    <link rel="stylesheet" href='/css/style.css'>
    <script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    
    
    
        <link href="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" rel="stylesheet">
    
    
    
    
        <link rel="stylesheet" href='/css/douban.css'>
    
        <link rel="stylesheet" href='/css/other.css'>
    
</head>

<link rel="stylesheet"
      href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<body>
    <header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="https://luckly.work/">
                        早起的年轻人
                    </a>
                
                <p class="description">专注于Flutter、Android、Java、Go语言(golang)、移动互联网、项目管理、软件架构</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="current" href="https://luckly.work/">首页</a>
                    
                    <a  href="https://luckly.work/categories/" title="分类">分类</a>
                    
                    <a  href="https://luckly.work/tags/" title="标签">标签</a>
                    
                    <a  href="https://luckly.work/about/" title="关于我">关于我</a>
                    
                    <a  href="https://github.com/ITmxs/" title="github">github</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>

    <div id="body">
        <div class="container">
            <div class="col-group">

                <div class="col-8" id="main">
                    
<div class="res-cons">
    <style type="text/css">
    .post-toc {
        position: fixed;
        width: 200px;
        margin-left: -210px;
        padding: 5px 10px;
        font-family: Athelas, STHeiti, Microsoft Yahei, serif;
        font-size: 12px;
        border: 1px solid rgba(0, 0, 0, .07);
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.98);
        background-clip: padding-box;
        -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        word-wrap: break-word;
        white-space: nowrap;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        z-index: 999;
        cursor: pointer;
        max-height: 70%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .post-toc .post-toc-title {
        width: 100%;
        margin: 0 auto;
        font-size: 20px;
        font-weight: 400;
        text-transform: uppercase;
        text-align: center;
    }

    .post-toc .post-toc-content {
        font-size: 15px;
    }

    .post-toc .post-toc-content>nav>ul {
        margin: 10px 0;
    }

    .post-toc .post-toc-content ul {
        padding-left: 20px;
        list-style: square;
        margin: 0.5em;
        line-height: 1.8em;
    }

    .post-toc .post-toc-content ul ul {
        padding-left: 15px;
        display: none;
    }

    @media print,
    screen and (max-width:1057px) {
        .post-toc {
            display: none;
        }
    }
</style>
<div class="post-toc" style="position: absolute; top: 188px;">
    <h2 class="post-toc-title">文章目录</h2>
    <div class="post-toc-content">
        <nav id="TableOfContents">
  <ul>
    <li><a href="#添加居中的-fabhttpscodewithandreacomarticlesbottom-bar-navigation-with-fabadding-a-centered-fab"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#adding-a-centered-fab">添加居中的 FAB</a></a></li>
    <li><a href="#添加带有导航的选项卡httpscodewithandreacomarticlesbottom-bar-navigation-with-fabadding-tabs-with-navigation"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#adding-tabs-with-navigation">添加带有导航的选项卡</a></a></li>
    <li><a href="#细节出汗httpscodewithandreacomarticlesbottom-bar-navigation-with-fabsweating-the-details"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#sweating-the-details">细节出汗</a></a></li>
    <li><a href="#底部导航栏呢httpscodewithandreacomarticlesbottom-bar-navigation-with-fabwhat-about-bottomnavigationbar"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#what-about-bottomnavigationbar?">底部导航栏呢？</a></a></li>
    <li><a href="#完整的源代码httpscodewithandreacomarticlesbottom-bar-navigation-with-fabfull-source-code"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#full-source-code">完整的源代码</a></a></li>
    <li><a href="#轻按-fab-时显示选项httpscodewithandreacomarticlesbottom-bar-navigation-with-fabrevealing-options-when-the-fab-is-tapped"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#revealing-options-when-the-fab-is-tapped">轻按 FAB 时显示选项</a></a></li>
  </ul>
</nav>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var postToc = $(".post-toc");
        if (postToc.length) {
            var leftPos = $("#main").offset().left;
            if(leftPos<220){
                postToc.css({"width":leftPos-10,"margin-left":(0-leftPos)})
            }

            var t = postToc.offset().top - 20,
                a = {
                    start: {
                        position: "absolute",
                        top: t
                    },
                    process: {
                        position: "fixed",
                        top: 20
                    },
                };
            $(window).scroll(function () {
                var e = $(window).scrollTop();
                e < t ? postToc.css(a.start) : postToc.css(a.process)
            })
        }
    })
</script>
    <article class="post">
        <header>
            <h1 class="post-title"></h1>
        </header>
        <date class="post-meta meta-date">
            1年1月1日
        </date>
        
        
        <div class="post-meta">
            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span>
                    阅读</span></span>
        </div>
        
        
        <div class="post-content">
            <p>今天我们将看到如何在 Flutter 中添加一个<code>FloatingActionButton</code>带有选项的(FAB) <code>BottomAppBar</code>。我们将构建这个 UI：</p>
<p>
        <a data-fancybox="gallery" href="https://luckly007.oss-cn-beijing.aliyuncs.com/img/BottomAppBar-Navigation-FAB-animation.gif">
            <img class="mx-auto" alt="img" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/BottomAppBar-Navigation-FAB-animation.gif" />
        </a>
    </p>
<p>我们在这里的具体目标是拥有一个<a href="https://docs.flutter.io/flutter/material/BottomAppBar-class.html"><code>BottomAppBar</code></a>行为与<a href="https://docs.flutter.io/flutter/material/BottomNavigationBar-class.html"><code>BottomNavigationBar</code></a>. 也就是说，在任何给定时间都有多个选项卡，其中恰好有一个选定的选项卡。</p>
<p>你可能想知道，为什么不<code>BottomNavigationBar</code>直接使用呢？</p>
<p>虽然在技术上可以将 a<code>FloatingActionButton</code>与 a “对接” <code>BottomNavigationBar</code>，但这在实践中效果不佳。更多关于这个下面。</p>
<p>现在，让我们看看如何使用<code>BottomAppBar</code>.</p>
<p><a href="https://github.com/RevenueCat/purchases-flutter">
        <a data-fancybox="gallery" href="https://codewithandrea.com/img/sponsor-revenue-cat.png">
            <img class="mx-auto" alt="Flutter 应用内购买和订阅变得简单" src="https://codewithandrea.com/img/sponsor-revenue-cat.png" />
        </a>
    所有人都可以免费使用 Andrea 编写代码。通过查看这个赞助商来帮助我保持这种状态：**Flutter 应用内购买和订阅变得简单。**RevenueCat 提供可靠的应用内购买基础设施，无需管理服务器。支持 iOS、Android 和 Stripe。免费试用。</a></p>
<h2 id="添加居中的-fabhttpscodewithandreacomarticlesbottom-bar-navigation-with-fabadding-a-centered-fab"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#adding-a-centered-fab">添加居中的 FAB</a></h2>
<p>创建一个新的 Flutter 项目后，我们得到了默认的示例应用程序。这已经包括一个<code>FloatingActionButton</code>用于递增计数器。</p>
<p>我们可以添加<code>BottomAppBar</code>到我们<code>Scaffold.bottomNavigationBar</code>，像这样：</p>
<pre><code>return Scaffold(
  appBar: AppBar(
    title: Text(widget.title),
  ),
  floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
  floatingActionButton: FloatingActionButton(
    onPressed: () { },
    tooltip: 'Increment',
    child: Icon(Icons.add),
    elevation: 2.0,
  ),
  bottomNavigationBar: BottomAppBar(
    child: Row(
      mainAxisSize: MainAxisSize.max,
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: &lt;Widget&gt;[],
    ),
    notchedShape: CircularNotchedRectangle(),
    color: Colors.blueGrey,
  ),
);
</code></pre><p>请注意我们如何设置<code>Scaffold.floatingActionButtonLocation</code>将<code>FloatingActionButtonLocation.centerDocked</code>FAB“停靠”到<code>BottomAppBar</code>.</p>
<p>我们还设置在 FAB 下方<code>notchedShape: CircularNotchedRectangle()</code>添加一个漂亮的缺口形状<code>BottomAppBar</code>。</p>
<p>如果我们在这个阶段运行应用程序，我们会得到：</p>
<p>
        <a data-fancybox="gallery" href="https://luckly007.oss-cn-beijing.aliyuncs.com/img/BottomAppBar-Navigation-FAB.png">
            <img class="mx-auto" alt="img" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/BottomAppBar-Navigation-FAB.png" />
        </a>
    </p>
<h2 id="添加带有导航的选项卡httpscodewithandreacomarticlesbottom-bar-navigation-with-fabadding-tabs-with-navigation"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#adding-tabs-with-navigation">添加带有导航的选项卡</a></h2>
<p>除了我们的 FAB，我们还想添加选项卡，以便我们可以在我们的应用程序中查看不同的页面。</p>
<p>为此，我们可以创建一个自定义<code>FABBottomAppBar</code>来处理以下内容：</p>
<ul>
<li>显示 2 个或 4 个选项卡（我们的设计是对称的）。</li>
<li>突出显示并跟踪当前选定的选项卡。</li>
<li>每次选择选项卡时都会触发回调，以便父级可以更新当前页面。</li>
</ul>
<p>那么我们的最小 API 会是什么样子<code>FABBottomAppBar</code>呢？让我们来看看：</p>
<pre><code>class FABBottomAppBarItem {
  FABBottomAppBarItem({this.iconData, this.text});
  IconData iconData;
  String text;
}

class FABBottomAppBar extends StatefulWidget {
  final List&lt;FABBottomAppBarItem&gt; items;
  final ValueChanged&lt;int&gt; onTabSelected;
  
  @override
  State&lt;StatefulWidget&gt; createState() =&gt; FABBottomAppBarState();
}

class FABBottomAppBarState extends State&lt;FABBottomAppBar&gt; {
  int _selectedIndex = 0;

  _updateIndex(int index) {
    widget.onTabSelected(index);
    setState(() {
      _selectedIndex = index;
    });
  }
  
  // TODO: build method here
}
</code></pre><p>首先，我们定义一个<code>FABBottomAppBarItem</code>包含 an<code>IconData</code>和 a 的类<code>String</code>。这表示单个选项卡项。</p>
<p>然后，我们创建一个<code>FABBottomAppBar</code>小部件。这需要指定项目列表和回调 ( <code>onTabSelected</code>)。</p>
<p><code>FABBottomAppBar</code>本身是一个<code>StatefulWidget</code>，因为它需要跟踪所选选项卡并相应地更新其外观。</p>
<p>在<code>FABBottomAppBarState</code>类中，我们定义了一个<code>_selectedIndex</code>，它在我们调用时更新<code>_updateIndex</code>。</p>
<p>接下来，我们需要定义<code>build</code>方法，在其中添加所有项目：</p>
<pre><code>@override
Widget build(BuildContext context) {
  List&lt;Widget&gt; items = List.generate(widget.items.length, (int index) {
    return _buildTabItem(
      item: widget.items[index],
      index: index,
      onPressed: _updateIndex,
    );
  });

  return BottomAppBar(
    child: Row(
      mainAxisSize: MainAxisSize.max,
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: items,
    ),
  );
}
</code></pre><p>一些注意事项：</p>
<ul>
<li><strong>第 3 到 9 行</strong>：这里我们使用列表生成器来创建选项卡项，传入正确的项、索引和宽度。</li>
<li><strong>第 11 到 17 行</strong>：我们创建一个<code>BottomAppBar</code>包含<code>Row</code>我们定义的项目的a 。我们使用<code>MainAxisSize.max</code>和<code>MainAxisAlignment.spaceAround</code>确保使用全宽并且项目等距。</li>
</ul>
<p>然后，我们实现该<code>_buildTabItem</code>方法。这里是：</p>
<pre><code>Widget _buildTabItem({
  FABBottomAppBarItem item,
  int index,
  ValueChanged&lt;int&gt; onPressed,
}) {
  Color color = _selectedIndex == index ? widget.selectedColor : widget.color;
  return Expanded(
    child: SizedBox(
      height: widget.height,
      child: Material(
        type: MaterialType.transparency,
        child: InkWell(
          onTap: () =&gt; onPressed(index),
          child: Column(
            mainAxisSize: MainAxisSize.min,
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              Icon(item.iconData, color: color, size: widget.iconSize),
              Text(
                item.text,
                style: TextStyle(color: color),
              )
            ],
          ),
        ),
      ),
    ),
  );
}
</code></pre><p>在第 6 行，我们检查所选索引是否与当前选项卡索引匹配，并相应地选择活动/非活动颜色。</p>
<p>在第 13 到 26 行，我们定义了一个<code>InkWell</code>包裹在<code>Material</code>小部件内的。这为我们<code>onTap</code>提供了一个手势识别器，并在点击小部件时提供了材质飞溅效果。</p>
<p>我们的孩子<code>InkWell</code>是 a <code>Column</code>，其中包含一个<code>Icon</code>and <code>Text</code>，两者都配置了来自 input 的数据<code>FABBottomAppBarItem</code>。</p>
<p>整个结果被包裹在一个<code>Expanded</code>小部件中。这保证了每个项目在 parent 内具有相同的宽度<code>Row</code>。</p>
<p>我们可以测试<code>FABBottomAppBar</code>使用它作为我们创造<code>bottomNavigationBar</code>我们的<code>Scaffold</code>，并提供了四个项目：</p>
<pre><code>bottomNavigationBar: FABBottomAppBar(
  onTabSelected: _selectedTab,
  items: [
    FABBottomAppBarItem(iconData: Icons.menu, text: 'This'),
    FABBottomAppBarItem(iconData: Icons.layers, text: 'Is'),
    FABBottomAppBarItem(iconData: Icons.dashboard, text: 'Bottom'),
    FABBottomAppBarItem(iconData: Icons.info, text: 'Bar'),
  ],
),
</code></pre><p>结果如下：</p>
<p>
        <a data-fancybox="gallery" href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/images/BottomAppBar-Navigation-FAB-4-items.png">
            <img class="mx-auto" alt="img" src="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/images/BottomAppBar-Navigation-FAB-4-items.png" />
        </a>
    </p>
<p>我们现在可以切换选项卡，并在每次切换时获得回调。</p>
<h2 id="细节出汗httpscodewithandreacomarticlesbottom-bar-navigation-with-fabsweating-the-details"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#sweating-the-details">细节出汗</a></h2>
<p>迄今为止取得了令人鼓舞的进展。但是有一些事情我们可以改进，以使我们的产品<code>FABBottomAppBar</code>更加“生产就绪”。</p>
<p>在上面的示例代码中，我们对以下内容进行了硬编码：</p>
<ul>
<li><code>BottomAppBar</code>：<code>height</code>，<code>backgroundColor</code>和<code>notchedShape</code></li>
<li>图标大小</li>
<li>活动/非活动选项卡颜色</li>
</ul>
<p>此外，中间的标签图标感觉有点太接近 FAB 本身。在中间添加一些间距会很好。</p>
<p>更好的是，为什么不在 FAB 下方添加一个小的可选文本标题，与选项卡的文本基线对齐？</p>
<p>让我们一口气解决所有这些问题。这是我们的最终代码<code>FABBottomAppBar</code>：</p>
<pre><code>import 'package:flutter/material.dart';

class FABBottomAppBarItem {
  FABBottomAppBarItem({this.iconData, this.text});
  IconData iconData;
  String text;
}

class FABBottomAppBar extends StatefulWidget {
  FABBottomAppBar({
    this.items,
    this.centerItemText,
    this.height: 60.0,
    this.iconSize: 24.0,
    this.backgroundColor,
    this.color,
    this.selectedColor,
    this.notchedShape,
    this.onTabSelected,
  }) {
    assert(this.items.length == 2 || this.items.length == 4);
  }
  final List&lt;FABBottomAppBarItem&gt; items;
  final String centerItemText;
  final double height;
  final double iconSize;
  final Color backgroundColor;
  final Color color;
  final Color selectedColor;
  final NotchedShape notchedShape;
  final ValueChanged&lt;int&gt; onTabSelected;

  @override
  State&lt;StatefulWidget&gt; createState() =&gt; FABBottomAppBarState();
}

class FABBottomAppBarState extends State&lt;FABBottomAppBar&gt; {
  int _selectedIndex = 0;

  _updateIndex(int index) {
    widget.onTabSelected(index);
    setState(() {
      _selectedIndex = index;
    });
  }

  @override
  Widget build(BuildContext context) {
    List&lt;Widget&gt; items = List.generate(widget.items.length, (int index) {
      return _buildTabItem(
        item: widget.items[index],
        index: index,
        onPressed: _updateIndex,
      );
    });
    items.insert(items.length &gt;&gt; 1, _buildMiddleTabItem());

    return BottomAppBar(
      shape: widget.notchedShape,
      child: Row(
        mainAxisSize: MainAxisSize.max,
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: items,
      ),
      color: widget.backgroundColor,
    );
  }

  Widget _buildMiddleTabItem() {
    return Expanded(
      child: SizedBox(
        height: widget.height,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          mainAxisAlignment: MainAxisAlignment.center,
          children: &lt;Widget&gt;[
            SizedBox(height: widget.iconSize),
            Text(
              widget.centerItemText ?? '',
              style: TextStyle(color: widget.color),
            ),
          ],
        ),
      ),
    );
  }

  Widget _buildTabItem({
    FABBottomAppBarItem item,
    int index,
    ValueChanged&lt;int&gt; onPressed,
  }) {
    Color color = _selectedIndex == index ? widget.selectedColor : widget.color;
    return Expanded(
      child: SizedBox(
        height: widget.height,
        child: Material(
          type: MaterialType.transparency,
          child: InkWell(
            onTap: () =&gt; onPressed(index),
            child: Column(
              mainAxisSize: MainAxisSize.min,
              mainAxisAlignment: MainAxisAlignment.center,
              children: &lt;Widget&gt;[
                Icon(item.iconData, color: color, size: widget.iconSize),
                Text(
                  item.text,
                  style: TextStyle(color: color),
                )
              ],
            ),
          ),
        ),
      ),
    );
  }
}
</code></pre><p>请注意现在我们如何指定 a <code>centerItemText</code>，它将位于 FAB 正下方。如果这是空的 or <code>null</code>，我们渲染一个空的<code>Text</code>。</p>
<p>这是最终结果：</p>
<p>
        <a data-fancybox="gallery" href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/images/BottomAppBar-Navigation-FAB-5-items.png">
            <img class="mx-auto" alt="img" src="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/images/BottomAppBar-Navigation-FAB-5-items.png" />
        </a>
    </p>
<h2 id="底部导航栏呢httpscodewithandreacomarticlesbottom-bar-navigation-with-fabwhat-about-bottomnavigationbar"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#what-about-bottomnavigationbar?">底部导航栏呢？</a></h2>
<p>我曾尝试将 FAB 停靠在 a 中<code>BottomNavigationBar</code>，但我发现了一些限制：</p>
<ul>
<li>除了创建一个<code>BottomNavigationBarItem</code>. 这是不可取的，因为<code>BottomNavigationBarItem</code>它本身就是一个选项卡，可以点击。</li>
<li><code>BottomNavigationBar</code>不支持<code>notchedShape</code>。</li>
</ul>
<p>使用<code>BottomAppBar</code>需要更多的代码，但更灵活，因为它<code>Row</code>在引擎盖下使用，并且可以根据需要进行配置。</p>
<p><em>顺便说一句，如果您想了解更多有关<code>BottomNavigationBar</code>以及如何使用它来启用多个独立导航器的信息，请务必阅读我之前的文章：</em></p>
<ul>
<li><a href="https://codewithandrea.com/articles/multiple-navigators-bottom-navigation-bar/">Flutter 案例研究：具有 BottomNavigationBar 的多个导航器</a></li>
</ul>
<h2 id="完整的源代码httpscodewithandreacomarticlesbottom-bar-navigation-with-fabfull-source-code"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#full-source-code">完整的源代码</a></h2>
<p>我<a href="https://github.com/bizz84/bottom_bar_fab_flutter">在 GitHub 上</a>开源了我的完整示例。🙏</p>
<p>随意在您的项目中重用它。😎</p>
<h2 id="轻按-fab-时显示选项httpscodewithandreacomarticlesbottom-bar-navigation-with-fabrevealing-options-when-the-fab-is-tapped"><a href="https://codewithandrea.com/articles/bottom-bar-navigation-with-fab/#revealing-options-when-the-fab-is-tapped">轻按 FAB 时显示选项</a></h2>
<p>这将在下一篇文章中介绍：</p>

        </div>

        
<div class="post-archive">
    <ul class="post-copyright">
        <li><strong>原文作者：</strong><a rel="author" href="https://luckly.work/">luckly</a></li>
        <li style="word-break:break-all"><strong>原文链接：</strong><a href="https://luckly.work/post/flutter/Flutter%E4%BD%BF%E7%94%A8-FAB-%E7%9A%84%E5%BA%95%E9%83%A8%E5%BA%94%E7%94%A8%E6%A0%8F%E5%AF%BC%E8%88%AA/">https://luckly.work/post/flutter/Flutter%E4%BD%BF%E7%94%A8-FAB-%E7%9A%84%E5%BA%95%E9%83%A8%E5%BA%94%E7%94%A8%E6%A0%8F%E5%AF%BC%E8%88%AA/</a></li>
        <li><strong>版权声明：</strong>本作品采用<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/">知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议</a>进行许可，非商业转载请注明出处（作者，原文链接），商业转载请联系作者获得授权。</li>
    </ul>
</div>
<br/>



        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/post/%E4%BF%A1%E6%81%AF/%E5%8F%98%E6%9B%B4%E7%AE%A1%E7%90%86/">变更管理</a></li>
        
        <li><a href="/post/%E4%BF%A1%E6%81%AF/%E7%9F%A5%E8%AF%86%E7%AE%A1%E7%90%86/">知识管理</a></li>
        
        <li><a href="/post/%E4%BF%A1%E6%81%AF/%E6%96%87%E6%A1%A3%E5%92%8C%E9%85%8D%E7%BD%AE%E7%AE%A1%E7%90%86/">文档和配置管理</a></li>
        
        <li><a href="/post/%E4%BF%A1%E6%81%AF/%E5%90%88%E5%90%8C%E7%AE%A1%E7%90%86/">合同管理</a></li>
        
        <li><a href="/post/%E4%BF%A1%E6%81%AF/%E9%87%87%E8%B4%AD%E7%AE%A1%E7%90%86/">采购管理</a></li>
        
    </ul>
</div>


        <div class="post-meta meta-tags">
            
            没有标签
            
        </div>
    </article>
    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "https://github.com/ITmxs/repo"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
</div>

                    <footer id="footer">
    <div>
        &copy; 2021 <a href="https://luckly.work/">早起的年轻人 By luckly</a>
        
        | <a rel="nofollow" target="_blank" href="http://beian.miit.gov.cn/">粤ICP备2021号-1</a>
        
    </div>
    <br />
    <div>
        <div class="github-badge">
            <a href="https://juejin.cn/user/3843548384077192" target="_black" rel="nofollow"><span class="badge-subject">Powered by</span><span class="badge-value bg-blue">掘金</span></a>
        </div>
        <div class="github-badge">
            <a href="https://space.bilibili.com/480883651" target="_black"><span class="badge-subject">Design by</span><span class="badge-value bg-brightgreen">早起的年轻人</span></a>
        </div>
        <div class="github-badge">
            <a href="https://cloud.tencent.com/developer/user/6702670" target="_black"><span class="badge-subject">Theme</span><span class="badge-value bg-yellowgreen">云社区</span></a>
        </div>
    </div>
</footer>


    
    <script type="text/javascript">
        window.MathJax = {
            tex2jax: {
                inlineMath: [['$', '$']],
                processEscapes: true
                }
            };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script><script src="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src='/js/totop.js?v=0.0.0' async=""></script>



    <script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




    <script src='/js/douban.js'></script>
    <script src="/js/copy-to-clipboard.js"></script>

                </div>

                <div id="secondary">
    <section class="widget">
        <form id="search" action='https://luckly.work/search/' method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="https://luckly.work/">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E5%8F%98%E6%9B%B4%E7%AE%A1%E7%90%86/" title="变更管理">变更管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E7%9F%A5%E8%AF%86%E7%AE%A1%E7%90%86/" title="知识管理">知识管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E6%96%87%E6%A1%A3%E5%92%8C%E9%85%8D%E7%BD%AE%E7%AE%A1%E7%90%86/" title="文档和配置管理">文档和配置管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E5%90%88%E5%90%8C%E7%AE%A1%E7%90%86/" title="合同管理">合同管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E9%87%87%E8%B4%AD%E7%AE%A1%E7%90%86/" title="采购管理">采购管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E9%A3%8E%E9%99%A9%E7%AE%A1%E7%90%86/" title="风险管理">风险管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E6%B2%9F%E9%80%9A%E7%AE%A1%E7%90%86%E5%92%8C%E5%B9%B2%E7%B3%BB%E4%BA%BA%E7%AE%A1%E7%90%86/" title="沟通管理和干系人管理">沟通管理和干系人管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90%E7%AE%A1%E7%90%86/" title="人力资源管理">人力资源管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E8%B4%A8%E9%87%8F%E7%AE%A1%E7%90%86/" title="质量管理">质量管理</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E8%8C%83%E5%9B%B4%E7%AE%A1%E7%90%86/" title="范围管理">范围管理</a>
    </li>
    
</ul>
    </section>

    
<section class="widget">
    <h3 class="widget-title" style="color:red">福利派送</h3>
    <ul class="widget-list">
        
        <li>
            <a href="https://blog.csdn.net/qq_39132095?spm=1001.2101.3001.5343" title="我的CSDN" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
        <li>
            <a href="https://space.bilibili.com/480883651" title="我的哔哩哔哩" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
        <li>
            <a href="https://www.zhihu.com/people/yimi-yang-guang-96-65" title="我的知乎" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title"><a href='/categories/'>分类</a></h3>
<ul class="widget-list">
    
    <li><a href="https://luckly.work/categories/Go/">Go (1)</a></li>
    
    <li><a href="https://luckly.work/categories/Mysql/">Mysql (1)</a></li>
    
    <li><a href="https://luckly.work/categories/Nginx/">Nginx (1)</a></li>
    
    <li><a href="https://luckly.work/categories/YouTube%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD/">YouTube视频下载 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/android/">android (1)</a></li>
    
    <li><a href="https://luckly.work/categories/dart/">dart (15)</a></li>
    
    <li><a href="https://luckly.work/categories/Flutter/">Flutter (201)</a></li>
    
    <li><a href="https://luckly.work/categories/git/">git (3)</a></li>
    
    <li><a href="https://luckly.work/categories/Go/">Go (4)</a></li>
    
    <li><a href="https://luckly.work/categories/ios/">ios (1)</a></li>
    
    <li><a href="https://luckly.work/categories/linux/">linux (1)</a></li>
    
    <li><a href="https://luckly.work/categories/read/">读书笔记 (6)</a></li>
    
    <li><a href="https://luckly.work/categories/redis/">redis (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99/">个人资料 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B9%A6%E5%8D%95/">书单 (8)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B9%A6%E8%AF%84/">书评 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统管理师 (8)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统项目管理师 (14)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%8E%9F%E5%88%99/">原则 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%8E%9F%E7%94%9F%E9%80%9A%E8%AE%AF/">原生通讯 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%9F%BA%E7%A1%80/">基础 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%A4%8D%E5%88%A9%E6%95%88%E5%BA%94/">复利效应 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%B0%91%E6%9C%89%E4%BA%BA%E8%B5%B0%E7%9A%84%E8%B7%AF/">少有人走的路 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%BF%83%E8%AF%AD/">心语 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E6%8F%92%E4%BB%B6/">插件 (4)</a></li>
    
    <li><a href="https://luckly.work/categories/%E6%95%99%E5%AD%A6/">教学 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%8E%8B%E9%98%B3%E6%98%8E/">王阳明 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%94%B5%E5%AD%90%E4%B9%A6/">电子书 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%99%BB%E9%99%86%E8%A1%A8%E5%8D%95/">登陆表单 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%A8%BB%E7%9B%9B%E5%92%8C%E5%A4%AB/">稻盛和夫 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%A9%B7%E7%88%B8%E7%88%B8%E5%AF%8C%E7%88%B8%E7%88%B8/">穷爸爸富爸爸 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%B2%BE%E8%BF%9B/">精进 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%BC%96%E7%A8%8B/">编程 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B9%8B%E8%B7%AF/">财务自由之路 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%91%E6%AD%A5/">跑步 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82/">路由传参 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%AF%E7%BA%BF/">路线 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%BD%AF%E4%BB%B6%E5%AE%9E%E6%96%BD/">软件实施 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%98%B3%E6%98%8E%E5%BF%83%E5%AD%A6/">阳明心学 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%A1%B9%E7%9B%AE/">项目 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%AD%85%E5%8A%9B/">魅力 (1)</a></li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title"><a href='/tags/'>标签</a></h3>
<div class="tagcloud">
    
    <a href="https://luckly.work/tags/go/">go</a>
    
    <a href="https://luckly.work/tags/Mysql/">Mysql</a>
    
    <a href="https://luckly.work/tags/Nginx/">Nginx</a>
    
    <a href="https://luckly.work/tags/YouTube%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD/">YouTube视频下载</a>
    
    <a href="https://luckly.work/tags/android/">android</a>
    
    <a href="https://luckly.work/tags/dart/">dart</a>
    
    <a href="https://luckly.work/tags/flutter/">flutter</a>
    
    <a href="https://luckly.work/tags/git/">git</a>
    
    <a href="https://luckly.work/tags/go/">go</a>
    
    <a href="https://luckly.work/tags/ios/">ios</a>
    
    <a href="https://luckly.work/tags/linux/">linux</a>
    
    <a href="https://luckly.work/tags/redis/">redis</a>
    
    <a href="https://luckly.work/tags/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99/">个人资料</a>
    
    <a href="https://luckly.work/tags/%E4%B9%A6%E5%8D%95/">书单</a>
    
    <a href="https://luckly.work/tags/%E4%B9%A6%E8%AF%84/">书评</a>
    
    <a href="https://luckly.work/tags/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统管理师</a>
    
    <a href="https://luckly.work/tags/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统项目管理师</a>
    
    <a href="https://luckly.work/tags/%E5%85%A5%E9%97%A8/">入门</a>
    
    <a href="https://luckly.work/tags/%E5%8E%9F%E5%88%99/">原则</a>
    
    <a href="https://luckly.work/tags/%E5%8E%9F%E7%94%9F%E9%80%9A%E8%AE%AF/">原生通讯</a>
    
    <a href="https://luckly.work/tags/%E5%9F%BA%E7%A1%80/">基础</a>
    
    <a href="https://luckly.work/tags/%E5%A4%8D%E5%88%A9%E6%95%88%E5%BA%94/">复利效应</a>
    
    <a href="https://luckly.work/tags/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程</a>
    
    <a href="https://luckly.work/tags/%E5%B0%91%E6%9C%89%E4%BA%BA%E8%B5%B0%E7%9A%84%E8%B7%AF/">少有人走的路</a>
    
    <a href="https://luckly.work/tags/%E5%BF%83%E8%AF%AD/">心语</a>
    
    <a href="https://luckly.work/tags/%E6%8F%92%E4%BB%B6/">插件</a>
    
    <a href="https://luckly.work/tags/%E6%95%99%E5%AD%A6/">教学</a>
    
    <a href="https://luckly.work/tags/%E7%8E%8B%E9%98%B3%E6%98%8E/">王阳明</a>
    
    <a href="https://luckly.work/tags/%E7%94%B5%E5%AD%90%E4%B9%A6/">电子书</a>
    
    <a href="https://luckly.work/tags/%E7%99%BB%E9%99%86%E8%A1%A8%E5%8D%95/">登陆表单</a>
    
    <a href="https://luckly.work/tags/%E7%A8%BB%E7%9B%9B%E5%92%8C%E5%A4%AB/">稻盛和夫</a>
    
    <a href="https://luckly.work/tags/%E7%A9%B7%E7%88%B8%E7%88%B8%E5%AF%8C%E7%88%B8%E7%88%B8/">穷爸爸富爸爸</a>
    
    <a href="https://luckly.work/tags/%E7%B2%BE%E8%BF%9B/">精进</a>
    
    <a href="https://luckly.work/tags/%E7%BC%96%E7%A8%8B/">编程</a>
    
    <a href="https://luckly.work/tags/%E8%AF%97/">诗</a>
    
    <a href="https://luckly.work/tags/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">读书笔记</a>
    
    <a href="https://luckly.work/tags/%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B9%8B%E8%B7%AF/">财务自由之路</a>
    
    <a href="https://luckly.work/tags/%E8%B7%91%E6%AD%A5/">跑步</a>
    
    <a href="https://luckly.work/tags/%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82/">路由传参</a>
    
    <a href="https://luckly.work/tags/%E8%B7%AF%E7%BA%BF/">路线</a>
    
    <a href="https://luckly.work/tags/%E8%BD%AF%E4%BB%B6%E5%AE%9E%E6%96%BD/">软件实施</a>
    
    <a href="https://luckly.work/tags/%E9%80%9A%E8%AE%AF%E5%BD%95/">通讯录</a>
    
    <a href="https://luckly.work/tags/%E9%98%B3%E6%98%8E%E5%BF%83%E5%AD%A6/">阳明心学</a>
    
    <a href="https://luckly.work/tags/%E9%A1%B9%E7%9B%AE/">项目</a>
    
    <a href="https://luckly.work/tags/%E9%AD%85%E5%8A%9B/">魅力</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://www.flysnow.org/" title="飞雪无情的博客">飞雪无情的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="http://yuedu.baidu.com/ebook/14a722970740be1e640e9a3e" title="Android Gradle权威指南">Android Gradle权威指南</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="https://luckly.work/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
            </div>
        </div>
    </div>
</body>

</html>